package com.ysz.controller;

import com.ysz.component.tableshard.TableShardAnnotation;
import com.ysz.mapper.S1Mapper;
import com.ysz.component.page.PageView;
import com.ysz.pojo.S1;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;


/**
 * @ClassName TestController
 * @Description TODO
 * @Data 16:33
 * @Version 1.0
 * @Author ysz
 */
@RestController
@Slf4j
public class TestController {

    @Autowired
    private S1Mapper s1Mapper;

    @RequestMapping(value = "/test1", method = RequestMethod.GET)
    public void test1() {
        PageView pageView = new PageView();
        pageView.setLimit(10);
        pageView.setPage(1L);
        pageView.setDoCount(true);
        List<S1> s1s = s1Mapper.selectByPage(pageView, "1", 2, new ArrayList());
        //Long aLong = s1Mapper.selectByPageByCount(pageView, "1", 2, new ArrayList());
        //System.out.println(aLong);
        System.out.println(s1s);
    }
}
